<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<input id="dailySaleSetID" type="hidden" data-sale="1" data-set="0">
<input id="isAllOnCod" type="hidden" value="">
<!--分页-->
<div class="col-xs-12 p0 mTop10" style="text-align:right;min-height:35px;">
	<ul id="upPage" class="pageDiv" style="margin:0 0 4px;"></ul>
</div>
<div class="col-xs-12 p0">
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

	<style>
		.click-expand {
			width: 32px;
			height: 28px;
			position: absolute;
			left: 0;
			top: 0;
			z-index: 1;
		}
	</style>
	<form id="printJhForm" action="" method="POST" target="_blank">
		<input id="pageNo" type="hidden" value="1">
		<input id="totalPage" type="hidden" value="1">
		<input id="pageSize" type="hidden" value="100">
		<input id="totalSize" type="hidden" value="3">
		<!---
		<input id="orderIdsStr" type="hidden" value="<%=itemIDs%>">
		--->
		<button class="hide" type="button" id="printJhBtn1" onclick="batchPrintPackageHtml(1)">print</button>
		<button class="hide" type="button" id="printJhBtn2" onclick="PrintJhAll(1)">print</button>
		<button class="hide" type="button" id="printJhBtn3" onclick="PrintJhAll(2)">print</button>
		<button class="hide" type="button" id="printJhBtn4" onclick="PrintJhAll(3)">print</button>
		<button class="hide" type="button" id="printJhBtn6" onclick="PrintJhAll(3, 1)">print</button>
		<button class="hide" type="button" id="printJhBtn5" onclick="batchPrintPackageHtml(1,'','',1)">print</button>
		<input type="hidden" id="isDesc" name="isDesc" value="" />
		<input type="hidden" id="authId" name="authId" value="" />
		<input type="hidden" id="packageIds" name="packageIds" value="" />
		<input type="hidden" id="orderField" name="orderField" value="" />
		<input type="hidden" id="stockProductNum" value="1">
		<table class="myj-table" id="orderListTable" cid="productList">
			<thead>
				<tr>
					<th class="p0-imp minW190">
						<input class="pull-left m-left10" id="selectAll" name="curPage" type="checkbox"
							selIptId="selectAll" onclick="showSelCheckboxNum(this, 'order');" />&nbsp;&nbsp;商品信息
					</th>
					<th class="minW90">订单金额</th>
					<th class="minW135">收件人「国家/地区」</th>
					<th class="minW110-imp w180-imp">订单号</th>
					<th class="minW160">时间</th>
					<th>状态</th>
					<th class="border-right2 w70 minW70 maxW70">操作</th>
				</tr>
			</thead>
			<tbody class="xianshishujudate">
				<input type="hidden" id="profitPermission" value="1" />
				<!---
				<% data.forEach(function(item){%>
				<tr class="goodsId ">
					<td colspan="2" class="relative orderListTitFirTd parent">
						<div class="click-expand expand_scope"></div>
						<input class="input1" type="checkbox" name="packageId" datename="showdate"
							onclick="showSelCheckboxNum(this, 'order');" value="<%=item.packageId%>"
							data-commit="uncommit" />
						<input type="hidden" id="dxmAuthId<%=item.packageId%>" value="<%=item.value%>"
							data-platform="<%=item.platform%>" data-globalcollection="<%=item.globalcollection%>" data-shopid="<%=item.shopid%>"
							data-storageid="<%=item.storageid%>" data-agentid="<%=item.agentid%>" data-country="<%=item.country%>"
							data-orderId="<%=item.orderId%>" data-createtime="<%=item.createtime%>"
							data-packageNumber="<%=item.packageNumber%>" />
						<a href="javascript:" class="limingcentUrlpic"
							onclick="dxmPackageDetail('<%=item.packageId%>');"><%=item.packageNumber%></a>
						<div class="custom-sign custom-sign-myj" uid="custom-sign-myj">
							<input type="hidden" class="moduleOrderId" value="<%=item.packageId%>" />
							<span class="module module-default dataTriggerHover " uid="default" data-container="body"
								data-toggle="popover" data-placement="top" data-content="设置自定义标记"></span>
							<span class="module module-a dataTriggerHover myj-hide" uid="moduleA" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-b dataTriggerHover myj-hide" uid="moduleB" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-c dataTriggerHover myj-hide" uid="moduleC" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-d dataTriggerHover myj-hide" uid="moduleD" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-e dataTriggerHover myj-hide" uid="moduleE" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-f dataTriggerHover myj-hide" uid="moduleF" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-w dataTriggerHover myj-hide" uid="moduleW" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-x dataTriggerHover myj-hide" uid="moduleX" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-y dataTriggerHover myj-hide" uid="moduleY" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
							<span class="module module-z dataTriggerHover myj-hide" uid="moduleZ" data-container="body"
								data-toggle="popover" data-placement="top" data-content=""></span>
						</div>
					</td>
					<td class="f-right p-right30" colspan="1">
						<span>支付:
							<%=item.pay%></span>
					</td>
					<td colspan="2">
						<div>买家指定：
							<span class="white-space"><%=item.buy%></span>
						</div>
					</td>
					<td class="f-right" colspan="5">
						<span class="order-form-source"><%=item.source%></span>
					</td>
				</tr>
				
				<tr class="orderId_<%=item.packageId%>" data-isHaCnz="0" data-platform="tiktok"
					data-agentName="tiktok-TikTok线上发货" data-orderPrice="15.32" data-orderid="<%=item.packageId%>">
					<td class="p0-imp">
						<table class="tableIn">
							<tr class="pairProInfo">
								<td class="p-right0 w60 f-center">
									<div class="listImgOut m-left0 make-pair-box make-pair-div">
										<div class="listImgIn" data-type="1" data-hasProductId="1">
											<img class="imgCss lazy pairProInfoImg" src=""
												data-original="<%=item.goodImg%>"
												data-order="<%=item.goodImg%>"
												referrerpolicy="no-referrer" />
											<input type="hidden" class="create"
												id="relationListHidden_<%=item.packageId%>_0" vid="1729516539065042288"
												pid="1729516539064976752" packageid="<%=item.packageId%>"
												platform="tiktok" shopid="4829046" displaysku="zudafu1*3pcs"
												proid="96966826198903176" currid="96966838792702162" count="1"
												warehoseid="6645884" orderproductid="96966824206345874" />
											<input type="hidden" class="pair" data-id="<%=item.packageId%>" data-index="0"
												data-state="paid" data-overseawarehose="0"
												data-authid="<%=item.value%>" />
										</div>
									</div>
									<input id="orderSourceUrlType" type="hidden" value="1">
									<div class="dropdown btn-dropdown no-hover p-left10">
										<a class="dropdown-toggle gray-source" href="javascript:" data-toggle="dropdown"
											type="button" title="点击显示来源">来源<span class="caret"></span></a>
										<ul id="dropSourceUrl" class="dropdown-menu menu pull-left" role="menu"
											aria-labelledby="" style="min-width:120px;">
											<li class='default' style="margin-top: 0;">平台产品</li>
											<li role="presentation"><a
													data-url="https://detail.1688.com/offer/655472626656.html?spm=a262uh.11734178.favorite-offers-offer-list-offer1.2.52422ef6NUMLQy"
													href="javascript:" onclick="redirectUrl(this);">来源1：1688</a></li>
											<li class='default'>库存商品</li>
											<li role="presentation"><a
													data-url="https://mobile.yangkeduo.com/goods2.html?refer_share_id=6o4KH33F0zjQsk6UrGBwNXHKXmRfqFFn&amp;refer_share_channel=copy_link&amp;_oak_share_detail_id=3027695423&amp;_wvx=10&amp;pxq_secret_key=4472ASTRDE6FUHRHEUTMP6JTYPEO4YIUR7TEVCA477L4LQPDVBUQ&amp;_oak_share_time=1709733256&amp;_wv=41729&amp;share_uin=4SZIVRRIUG4P5JTBMA7LJKM57I_GEXDA&amp;page_from=101&amp;refer_share_uin=4SZIVRRIUG4P5JTBMA7LJKM57I_GEXDA&amp;goods_id=290847773145&amp;_oak_share_snapshot_num=336"
													href="javascript:" onclick="redirectUrl(this);">来源1：拼多多</a></li>
										</ul>
									</div>
								</td>
								<td class="p-right0">
									<div>
										<p class="limingcentUrlpicson">
											<a class="pairProInfoSku productUrl" href=""
												target="_blank">zudafu1*3pcs</a>

											&nbsp;x&nbsp;
											<span class="circularSpanGrey">1</span>
										</p>
										<p>MYR&nbsp;13.82</p>
										<p class="pairProInfoName orderPairNameIsOverlength">
											<span class="isOverLengThHide">
												Option：Piawai</span>
										</p>
									</div>
								</td>
							</tr>
						</table>
					</td>
					<td class="minW100">
						MYR&nbsp;15.32<br />
						<div class="relative m-top5 gray-c hover-prompt hoverPrompt pointer uClick small order-profit-prompt"
							id="profit_<%=item.packageId%>_box" data-placement="top" data-html="true">
							<div class="inline-block">
								<span id="p_<%=item.packageId%>"></span>
								<span id="unit_<%=item.packageId%>"></span>
								<span class="f13" id="profit_<%=item.packageId%>">--</span>
							</div>
							<div class="m-left20 f12 pointer" id="profitTypeShowDiv_<%=item.packageId%>">
								<span id="pShowTypeVal_<%=item.packageId%>"></span>
							</div>
						</div>
					</td>
					<td>
						<span class="mRight10 white-space"><%=userInfo.name%></span>
						<span>「<%=userInfo.position%>」</span>
					</td>
					<td class="tableOrderId">
						<a href="javascript:" onclick="dxmOrderDetail('<%=item.packageId%>');"
							class="limingcentUrlpic inline-block"><%=userInfo.orderID%></a>&nbsp;
						<p>
							<span class="squareSpan bg-dark-blue dataTriggerHover" data-container="body"
								data-toggle="popover" data-placement="top" data-html="true"
								data-content="<%=userInfo.goodPosiotonAlert%>"><%=userInfo.goodPosioton%></span>
						</p>
					</td>
					<td>
						<div>下单：<%=userInfo.orderTime%></div>
						<div>付款：</div>
					</td>
					<td class="min-w85 w85" rowspan="1">
						<%=userInfo.orderState%><br />
						<p class="m-top10">
						</p>
						<p class="m-top10">
						</p>
					</td>
					<td class="p-top3 f-center minW80">
						<a href="javascript:" onclick="auditPackage('<%=item.packageId%>');">审核</a><br /><a
							href="javascript:" onclick="showComment1('<%=item.packageId%>');">备注</a><br /><a
							href="javascript:" onclick="dxmPackageDetail('<%=item.packageId%>');">详情</a>
					</td>
				</tr>
				<% }) %>
				--->
				</tbody>
		</table>
	</form>
	<script type="text/javascript">
		publicHoverTextCanBeMovedIn('.blacklistTruggerHover');
		$('.dataTriggerHover').popover({
			trigger: 'hover'
		});
		$('.dataTriggerClick').popover({
			trigger: 'click'
		});
		//鼠标点击位置如果不是popver，popverhide;
		$(document).off('click.orderPopover', 'body').on('click.orderPopover', 'body', function(e) {
			if (!e) e = window.event;

			//获取事件点击元素
			var targ = e.target,
				//获取元素名称
				popover = $(targ).closest('.popover').length,
				$popover = $('.popover'),
				popoverFa = $(targ).hasClass('dataTriggerClick');

			if (popover !== 1 && !popoverFa && $popover.length) {
				$('[aria-describedby]').popover('hide'); //触发气泡事件把气泡移除
				$popover.remove(); //可能出现匹配不上未被移除的气泡，所以如果有未移除的气泡再移除一次
			}
		});
		$('[data-toggle="tooltip"]').tooltip();
		$('.amazonlatestDeliveryDate[data-toggle="popover"]').popover();
		//公用悬停显示文案可移入
		publicHoverTextCanBeMovedIn('.hoverShowCommonBrandMsg');
		// 注册买家备注气泡
		publicHoverTextCanBeMovedIn('.buyerNotes', 'top', true);
		expand_click3();
		$(document).ready(function() {
			var objs = $('.errorMsgHide');
			$.each(objs, function(i, j) {
				var html = $(j).html();
				var arry = '';
				if (html) {
					arry = strFilterUrl(html);
				}
				$(j).closest('.errorMsgBox').find('span.errorMsgShow').append(arry);
			});

			//创建商品
			var create = function(obj, info) {
				var $create = $(obj[0]).find('input.create'),
					$pair = $(obj[0]).find('input.pair'),
					id = $pair.attr('data-id'),
					sku = $create.attr('displaysku'),
					pid = $create.attr('pid'),
					vid = $create.attr('vid'),
					dataObj = {};
				if (!vid) {
					vid = pid;
				}
				dataObj.id = id;
				dataObj.sku = sku;
				dataObj.pid = pid;
				dataObj.vid = vid;

				comOpenWinPost('dxmCommodityProduct/viewCommodityProductFromOrder.htm', {
					orderInfo: JSON.stringify(dataObj)
				});
			};
			//配对
			var pair = function(obj, info) {
				var $pair = $(obj[0]).find("input.pair");
				showDialogWareHoseProductList($pair.attr('data-id'), $pair.attr('data-index'),
					$pair.attr("data-state"), $pair.attr("data-overseawarehose"), $pair.attr("data-authid"),
					obj[0]);
			};
			//添加来源
			var addSource = function(obj) {
				var $pair = $(obj[0]).find('input.pair');
				getSourceUrl($pair.attr('data-id'), $pair.attr('data-index'));
			};
			//寻找货源
			var findLink = function(obj, info) {
				var imgUrl = info.imgUrl;
				imgUrl = imgUrl.replace('-tiny.jpg', '-original.jpg').replace('_50x50.jpg', '').replace(
					'_80x80q80.jpg', '').replace('.80x80', '').replace('_100x100q100.jpg', '_800x800q100.jpg');
				imgUrl = imgUrl.replace('$_6.', '$_19.').replace('.cloudfront.net/image/150_150',
					'.cloudfront.net/image/400_400');
				PURCHASE_SOURCE.getAlibabaListMethod(imgUrl);
			};
			//淘宝找货源
			var taoBaoFindLink = function(obj, info) {
				var platform = $(obj).find('.create').attr('platform'),
					url = $(obj).closest('tr').find('a.productUrl').attr('href');
				if (!platform && url && url.indexOf('aliexpress.com') !== -1) platform = 'smt';

				// url = url && (platform === 'wish' || platform === 'ebay' || platform === 'amazon') ? 'productUrl='+url : 'imgUrl='+info.imgUrl;
				var imgUrl = info.imgUrl;
				imgUrl = imgUrl.replace('-tiny.jpg', '-original.jpg').replace('_50x50.jpg', '').replace(
					'_80x80q80.jpg', '').replace('.80x80', '').replace('_100x100q100.jpg', '_800x800q100.jpg');
				imgUrl = imgUrl.replace('$_6.', '$_19.').replace('.cloudfront.net/image/150_150',
					'.cloudfront.net/image/400_400');
				ORDER_SOURCE_FN.sourceDetail(imgUrl);
			};
			// 支持刊登的平台，用来判断图片是否显示添加来源
			var mayPublishPlatform = ['wish', 'smt', 'ebay', 'amazon', 'lazada', 'alibaba', 'fanno', 'shopify', 'dh',
				'shopee', 'joom', 'tophatter', 'shoplazza', 'tiktok'
			];
			//注册图片放大
			$('div.listImgIn').each(function() {
				var stockProductNumvar = $('#stockProductNum').val();
				var creates = {
					name: '<i class="glyphicon glyphicon-edit"></i>创建', //必传
					type: 'left', //必传
					call: create
				};
				var pairs = {
					name: '<i class="glyphicon glyphicon-random"></i>配对',
					type: 'left',
					call: pair
				};
				var addSources = {
					name: '添加来源',
					type: 'left',
					call: addSource
				};
				var proId = $(this).find('.create').attr('proid');
				if (proId) {
					pairs.name = '<i class="glyphicon glyphicon-random"></i>更换';
				}
				var source1 = { //1688
						name: '<i class="glyphicon glyphicon-search"></i>找货源 1688',
						type: 'right',
						call: findLink
					},
					source2 = { //淘宝
						name: '淘宝',
						type: 'right',
						call: taoBaoFindLink
					};
				var type = $.trim($(this).attr('data-type')),
					isCreate = $.trim($(this).attr('data-hasProductId')),
					action = [],
					platform = $(this).closest('tr[data-platform]').attr('data-platform');


				if (isCreate == "0" && stockProductNumvar == 1) {
					action.push(creates);
				}
				if (type == "1" || type == "0" && stockProductNumvar == 1) {
					action.push(pairs);
				}
				// 如果有来源链接权限
				if ($('#orderSourceUrlType').val() === '1') {
					// 属于支持刊登的平台并且有配对才显示添加来源
					if (mayPublishPlatform.indexOf(platform) !== -1 && proId && (type === '1' || type ===
							'0' && (+stockProductNumvar) === 1)) {
						action.push(addSources);
					}
				}
				action.push(source1);
				action.push(source2);
				$(this).extensiblePicZoom({
					type: 'order',
					divWidth: "350",
					divHeight: "350",
					action: action,
					isHasTaoBao: true //是否加淘宝入口
				});
			});
			/*注册懒加载*/
			$('.imgCss.lazy').lazyload({
				placeholder: "//www.dianxiaomi.com/static/img/loading5.gif",
				threshold: 1000,
				effect: "fadeIn",
				failurelimit: 20,
				skip_invisible: false
			}).removeClass('lazy');
			MYJ_PAGINATION.init(MYJ_PAGINATION.get([30, 50, 100, 300]), '', function(option) {
				if (+option.pageSize !== +$('#pageSize').val()) {
					typeof ORDER_STORAGE_SET !== 'undefined' && typeof ORDER_STORAGE_SET.set === 'function' &&
						ORDER_STORAGE_SET.set('pageSize', option.pageSize)
				}
				pageReload(option);
				$('.normalBtnGroup').removeClass('myj-hide');
				$('.printBtnGroup').addClass('myj-hide');
			});
			MYJ_PAGINATION.init(MYJ_PAGINATION.get([30, 50, 100, 300], true), '#ceilingPage', function(option) {
				if (+option.pageSize !== +$('#pageSize').val()) {
					typeof ORDER_STORAGE_SET !== 'undefined' && typeof ORDER_STORAGE_SET.set === 'function' &&
						ORDER_STORAGE_SET.set('pageSize', option.pageSize)
				}
				pageReload(option);
				$('.normalBtnGroup').removeClass('myj-hide');
				$('.printBtnGroup').addClass('myj-hide');
			});

			var $orderPairNameIsOverlength = $('.orderPairNameIsOverlength'),
				orderPairNameIsOverlengthHtml = '<div class="word-box order-word-box"><div class="whiteBar"></div>' +
				'<div class="word-in wordbox scroll-bar"></div>' +
				'<div class="triangle"></div></div>';
			$.each($orderPairNameIsOverlength, function(i, j) { //循环订单的商品信息
				var $obj = $(j);
				if ($obj.height() > 40) { //判断当前信息节点高度是否超过40，如果超过了则表示当前内容超过两行显示了
					$obj.addClass('hover-prompt relative').find('.isOverLengThHide').addClass(
					'no-new-line2'); //加超出两行隐藏class
					$obj.off('mouseover').on('mouseover', function() { //给当前节点加悬停气泡
						var yanModalObj = $(orderPairNameIsOverlengthHtml),
							newStr = $(this).find('.isOverLengThHide').html();
						if ($(this).find('.word-box').length < 1) {
							yanModalObj.find('.wordbox').append(newStr);
							$(this).append(yanModalObj);
						}
					});
				}
			});

			//不再关注按钮显示隐藏
			hasPutHoldMethod();
		});
	</script>
</div>

<!-- 分页 -->
<div class="col-xs-12 p0" style="text-align:right;">
	<ul id="downPage" class="pageDiv" style="margin:2px 0px 2px 0;"></ul>
</div>
<script type="text/javascript">
	$(document).ready(function() {
		<!---
		var orderIdsStr = '<%=itemIDs%>';
		--->
		//获取当前页所有订单的id
		if (orderIdsStr !== "") {
			var orderIds = [],
				$keepState = $('#keepState');
			if (orderIdsStr.indexOf(";")) {
				orderIds = orderIdsStr.split(";");
				$keepState.data("orderIds", orderIds);
				$keepState.data("currOrderNum", -1); //当前订单索引
			}
		}
	});

	// 翻页请求
	function pageReload(screenObj) {
		var url = "package/list.htm?pageNo=" + screenObj.pageNo + "&pageSize=" + screenObj.pageSize +
			"&shopId=-1&state=paid&authId=-1&country=&platform=&isSearch=0" +
			"&startTime=&endTime=&orderField=order_pay_time&isVoided=0&isRemoved=0&ruleId=-1&sysRule=&applyType=" +
			"&applyStatus=&printJh=-1&printMd=-1&commitPlatform=&productStatus=&jhComment=-1&storageId=0" +
			"&history=&custom=-1&isOversea=-1&timeOut=0&refundStatus=0&forbiddenStatus=-1&forbiddenReason=0&behindTrack=-1",
			$shopGroupId = $('#shopGroupId'),
			shopGroupId = $shopGroupId.length ? $.trim($shopGroupId.val()) : '';

		if (shopGroupId) url += '&shopGroupId=' + shopGroupId; //如果选中了店铺分组，则加上店铺分组参数作为筛选条件
		MYJ.ajax({
			type: 'GET',
			url: url,
			data: {},
			success: function(data) {
				$('#dxmBody').html(data);
				$('#selectedData').html('');
				refreshApprovedCountNum();
				refreshOrderProfit(0, 'packageId');
			}
		});
		$('#keepState').data({
			'ajaxurl': url,
			'ajaxpostdata': null,
			'pagesize': screenObj.pageSize
		});
	}
	// 当前显示的是哪个状态(未处理、异常订单、待发货等)
	var seledStateName = $("#keepState").data("stateName");
	$("#currState").html(seledStateName);

	// 显示 一键填充COD
	var isAllOnCod = $('#isAllOnCod').val();
	if (isAllOnCod === 'true' || isAllOnCod === true) {
		$('.butchUpdateCOD').removeClass('hide');
	} else {
		$('.butchUpdateCOD').addClass('hide');
	}


	$(document).off('click', '.operateBox .selectionRange ul li');
	$(document).on('click', '.operateBox .selectionRange ul li', function() {
		var that = $(this),
			selectVal = that.attr('data-value');
		if (selectVal) {
			that.closest('.operateBox').find('.operationResult .resultNumRange').html(selectVal).click();
		}
	});
</script>